package com.cddx.logistics.mapper;

import com.cddx.logistics.domain.dto.QueryDTO;
import com.cddx.logistics.domain.dto.UserRoleDTO;
import com.cddx.logistics.domain.pojo.Role;
import com.cddx.logistics.domain.pojo.User;
import com.cddx.logistics.domain.vo.UserVO;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;

@Mapper
public interface UserMapper {

    int addUser(User user);

    int updateUser(User user);

    int deleteUser(Integer id);

    List<UserVO> queryPage(QueryDTO queryDTO);

    int addRole(UserRoleDTO userRoleDTO);

    int updateUserStatus(@Param("id") Integer id, @Param("status")Integer status);

    int deleteIds(Integer[] ids);

    List<Role> queryRole(Integer id);

    int deleteRole(UserRoleDTO userRoleDTO);

    User userInfo(@Param("account") String account);
}
